package by.bsu.diploma.common;

/**
 * @author Antoly Selitsky
 */
public class Word implements Comparable<Word> {

    private int length;
    private int count;
    private Orientation orientation;
    private int col;
    private int row;

    public Word(int length, int count) {
        this.length = length;
        this.count = count;
    }

    public void update(int row, int col, Orientation orientation) {
        this.row = row;
        this.col = col;
        this.orientation = orientation;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Orientation getOrientation() {
        return orientation;
    }

    public void setOrientation(Orientation orientation) {
        this.orientation = orientation;
    }

    public int getCol() {
        return col;
    }

    public void setCol(int col) {
        this.col = col;
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
    }

    @Override
    public int compareTo(Word word) {
        return word.getLength() - this.length;
    }

}
